import request from '@/utils/request'

export function skuList(params) {
  return request({
    url: '/product/sku/list',
    method: 'get',
    params
  })
}

export function listSkuBySpuId(spuId) {
  return request({
    url: `/product/sku/listBySpuId/${spuId}`,
    method: 'get',
  })
}

export function updateSku(data) {
  return request({
    url: '/product/sku/update',
    method: 'POST',
    data
  })
}

export function deleteSku(id) {
  return request({
    url: `/product/sku/delete/${id}`,
    method: 'GET'
  })
}

export function listSkusForPreview() {
  return request({
    url: `/product/sku/find`,
    method: 'get',
  })
}
